/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.seaworldsoft.xinxifabu.entity;

import java.io.Serializable;
import java.util.Date;
import java.util.List;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.TableGenerator;
import javax.persistence.Temporal;

/**
 *
 * @author sam
 */
@Entity
@Table(name="sys_template")
public class Template implements Serializable {
       @Id
	@TableGenerator(name = "template", table = "sys_generator", pkColumnName = "key_name", pkColumnValue = "Tpl_ID", valueColumnName = "key_value", initialValue = 1, allocationSize = 1)
	@GeneratedValue(strategy = GenerationType.TABLE, generator = "template")
    
    private int tplId;
       
    /**
     * 模版组名称
     */
    @Column(length=50)
    private String tplName;   
    
    /*
     * 创建时间
     */
    @Temporal(javax.persistence.TemporalType.DATE)
    private Date createTime;
    
    /**
     * 模版简介
     */
    @Column(length=250)
    private String tplDemo;
    
    @OneToMany(mappedBy="tpl")
    private List<TemplateFile>  tplFiles;
    
    @OneToOne(mappedBy="template")
    private Channel channel;

    
    public int getTplId() {
        return tplId;
    }

    public void setTplId(int tplId) {
        this.tplId = tplId;
    }

    public String getTplName() {
        return tplName;
    }

    public void setTplName(String tplName) {
        this.tplName = tplName;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getTplDemo() {
        return tplDemo;
    }

    public void setTplDemo(String tplDemo) {
        this.tplDemo = tplDemo;
    }

    public List<TemplateFile> getTplFiles() {
        return tplFiles;
    }

    public void setTplFiles(List<TemplateFile> tplFiles) {
        this.tplFiles = tplFiles;
    }
    
    
    
    
    
    
    
    
}
